Skip to content

chore(web): replace apps/kimi-web with the code-app web bundle - #2599

Merged
liruifengv merged 9 commits into
mainfrom
chore/replace-kimi-web
Aug 5, 2026
Merged

chore(web): replace apps/kimi-web with the code-app web bundle#2599
liruifengv merged 9 commits into
mainfrom
chore/replace-kimi-web

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Summary

The web UI source now lives in the code-app repo (apps/web); this repo no longer builds it from source. apps/kimi-web is deleted and the CLI ships the prebuilt bundle synced from code-app, committed at apps/kimi-code/dist-web (gitignored, force-added — 533 files).

Going forward, updating the web UI in the CLI = run KIMI_CODE_REPO=<this checkout> pnpm run sync:web in code-app and commit the resulting dist-web diff, ideally in the same PR as the behavior change it carries.

Changes

  • Delete apps/kimi-web (292 files: source, tests, docs).
  • Root package.json: drop dev:web and the @moonshot-ai/kimi-web typecheck leg.
  • apps/kimi-code: drop the @moonshot-ai/kimi-web workspace dependency and the build-from-source step; copy-web-assets.mjs is replaced by scripts/check-web-assets.mjs, which fails packaging fast when the committed bundle is missing.
  • CI: _native-build.yml verifies the committed bundle instead of building from source; ci.yml and pkg-pr-new.yml drop the kimi-web legs.
  • Docs: AGENTS.md project map describes the new flow; .changeset/README.md package list and the gen-changesets / sync-changelog skills now key web: changelog entries on apps/kimi-code/dist-web instead of apps/kimi-web/.
  • Commit the synced bundle itself (built from code-app's current web, which has reached full upstream parity — every kimi-web fix since the fork point is covered or superseded).

Test plan

  • Root pnpm run typecheck (full chain incl. build:packages) passes
  • node apps/kimi-code/scripts/check-web-assets.mjs — bundle present (535 entries)
  • Production-mode boot: server comes up and serves the new bundle (GET / 200, fresh asset hash, favicon 200)
  • kap-server / apps/kimi-code suites: failures reproduce on an untouched origin/main worktree with the same profile (23 vs 24 failing files / 2 vs 2 — ENOTEMPTY temp-dir teardown races), i.e. pre-existing environment flakes, not regressions from this change

Follow-ups (not in this PR)

  • code-app bumps its kimi-code submodule to this merge and re-syncs dist-web so the bundle's embedded client version matches the CLI version again (currently 0.31.1 vs 0.32.0).
  • Release note: native builds no longer compile the web app — the committed bundle is embedded as-is.

The web UI source now lives in the code-app repo (apps/web); this repo
only ships the prebuilt bundle at apps/kimi-code/dist-web, synced from
code-app via \.

- delete apps/kimi-web (source, tests, docs)
- root package.json: drop dev:web and the kimi-web typecheck leg
- apps/kimi-code: drop the workspace dep and the build-from-source step;
  replace copy-web-assets.mjs with check-web-assets.mjs so packaging
  fails fast when the committed bundle is missing
- CI: _native-build verifies the committed bundle instead of building
  from source; ci.yml and pkg-pr-new.yml drop the kimi-web legs
- docs: AGENTS.md project map, changeset README, gen-changesets and
  sync-changelog skills now key web UI entries on dist-web
@changeset-bot

changeset-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 21bf4d5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

❌ Nix build failed

Hash mismatch in pnpmDeps:

Hash
specified sha256-dRVe0stYIorD8H/SyAIAJof6JinpT/3E/I0lyllbFWg=
got sha256-52qERxzBsr7sYsKFq22k6ODNHY2uL8meRWAkvxo01no=

Please update flake.nix with the got hash.

@pkg-pr-new

pkg-pr-new Bot commented Aug 4, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@21bf4d5
npx https://pkg.pr.new/@moonshot-ai/kimi-code@21bf4d5

commit: 21bf4d5

The ignore entry predates the code-app sync flow, when dist-web was a
local build artifact. The bundle is now the canonical, committed form of
the web UI, so ignoring it only forces every sync to git add -f.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d16e76c8b8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/package.json
The web: prefix convention and the web-specific dedup guidance belonged
to the in-repo web app. With the source moved to code-app, web UI
changes follow the same generic rules as any other CLI-bundle change.
- flake.nix: drop apps/kimi-web from the source fileset and package
  lists, and verify the committed dist-web in the native build phase
  instead of building the web app from source
- .oxlintrc.json: exclude dist-web (a committed build artifact) now
  that .gitignore no longer hides it from the linter
# Conflicts:
#	apps/kimi-web/src/components/chat/ChatPane.vue
Bundle rebuilt from code-app main (upstream parity ports #175, pinned
sidebar #176) with the CLI version 0.32.0 embedded.
@liruifengv
liruifengv merged commit 541ddd2 into main Aug 5, 2026
31 of 35 checks passed
@liruifengv
liruifengv deleted the chore/replace-kimi-web branch August 5, 2026 05:38
@github-actions github-actions Bot mentioned this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant